1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for processing a data stream in a data processing system. Still more particularly, the present invention relates to a method and apparatus for processing a transport stream including audio and video data.
2. Description of the Related Art
Multimedia, the presentation or transfer of information through more than one medium at any time, is a fast growing segment of the computer industry with many applications being developed, which incorporate various features of multimedia. Additionally, many businesses are using multimedia to present information to consumers. Multimedia combines different forms of media in the communication of information to a user through a data processing system, such as a personal computer. A multimedia application is an application that uses different forms of media within a single application. For example, multimedia applications may communicate data to a user through a computer via audio and video simultaneously. Such multimedia applications are usually bit intensive, real time, and very demanding, requiring ample processing power in the data processing system. Users may access in the multimedia, for example, in the form of video games or movies on a digital video disk (DVD) or through a communications link.
The Motion Picture Experts Group (MPEG) standard is a well-known standard for synchronizing reading and playback of compressed digital, audio and video data streams. With MPEG-2 data, two types of data streams are present, either program streams or transport streams. The transport stream is a stream definition which is tailored for communicating or storing one or more programs of coded data according to ITU-T Rec. H.262 .vertline. ISO/IEC 13818-2 and ISO/IEC 13818-3 and other data in environments in which significant errors may occur. Such errors may be manifested as bit value errors or loss of packets. Transport streams may be either fixed or variable rate. In either case, the constituent elementary streams may either be fixed or variable rate. The program stream is a stream definition which is tailored for communicating or storing one program of coded data and other data in environments where errors are very unlikely, and where processing of system coding, e.g., by software, is a major consideration.
Transport streams are meant to be sent over networks and are separated into 188 byte transport packets. These small amounts of data do not work well unless coalesced into bigger packets, especially when the data is ultimately sent down to hardware, which requires the data to be separated into special areas such as packetize elementary stream (PES) packet starts and presentation time stamp (PTS) changes. Each of these smaller packets causes an interrupt at the hardware level. With smaller packets, more interrupts occur, requiring increased central processing unit performance to handle the increased number of interrupts. PTS is a value in a field that may be present in a PES packet header that includes the time that a presentation unit (a decoded audio access unit for an audio frame or a decoded picture) is presented in the system target decoder. Standards for PES and generic coding of moving pictures and associated audio system may be found in ISO/IES 13818-1.
Transport streams also cause much overhead because of the small amounts of data. Each 188 byte transport packet includes a 4 byte header, leaving 184 bytes of data to be sent to hardware. Sending 184 byte packets to hardware is undesirable because of the amount of data for just one video frame usually is about fifty kilobytes of data. Therefore, it would be advantageous to have an improved method and apparatus for handling transport packets.